<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改学生信息</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
</head>
<body>
<div class="container">
    <div class="panel panel-primary">
        <div class="panel-heading">
            修改学生信息
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-md-6">
                    <form class="form-horizontal" action="/stu/update" method="POST">
                        <input type="hidden" th:value="${stu.stuid}" name="stuid">

                        <div class="form-group">
                            <label for="stu_education" class="col-sm-2 control-label">班级</label>
                            <div class="col-sm-10">
                                <select class="form-control" name="clsid" style="width: 200px;">
                                    <option th:each="ClassInfo:${clsinfo}" th:value="${ClassInfo.clsid}" th:text="${ClassInfo.clsName}"
                                    th:selected="${ClassInfo.clsid==stu.clsid}"
                                    >班级</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">  <!--表单水平排列-->
                            <label for="inputname" class="col-sm-2 control-label">姓名</label>
                            <div class="col-sm-10">
                                <input type="text" th:value="${stu.stu_name}" class="form-control" name="stu_name" id="inputname" placeholder="姓名">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="inputpassword" class="col-sm-2 control-label">密码</label>
                            <div class="col-sm-10">
                                <input type="password" th:value="${stu.stu_password}" class="form-control" name="stu_password" id="inputpassword" placeholder="密码">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">性别</label>
                            <div class="col-sm-10">
                                <label class="radio-inline">
                                    <input type="radio" th:checked="${stu.stu_sex}==true?1:0" name="stu_sex" checked value="1"> 男
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" th:checked="${stu.stu_sex}==false?1:0" name="stu_sex" value="0"> 女
                                </label>

                            </div>
                        </div>

                        <div class="form-group">
                            <label for="choosedate" class="col-sm-2 control-label">出生日期</label>
                            <div class="col-sm-10">
                                <input type="date" th:value="${stu.stu_birthday}" class="form-control" name="stu_birthday" id="choosedate">
                            </div>
                        </div>


                        <div class="form-group">
                            <label class="col-sm-2 control-label">兴趣爱好</label>
                            <div class="col-sm-10" >
                                <label class="checkbox-inline">
                                    <input type="checkbox" th:checked="${stu.stu_interest!=null&&stu.stu_interest.contains('电影')}" name="stu_interest" id="stu_interest1" value="电影"> 电影
                                </label>
                                <label class="checkbox-inline">
                                    <input type="checkbox" th:checked="${stu.stu_interest!=null&&stu.stu_interest.contains('篮球')}" name="stu_interest" id="stu_interest2" value="篮球"> 篮球
                                </label>
                                <label class="checkbox-inline">
                                    <input type="checkbox" th:checked="${stu.stu_interest!=null&&stu.stu_interest.contains('看书')}" name="stu_interest" id="stu_interest3" value="看书"> 看书
                                </label>
                                <label class="checkbox-inline">
                                    <input type="checkbox" th:checked="${stu.stu_interest!=null&&stu.stu_interest.contains('游戏')}" name="stu_interest" id="stu_interest4" value="游戏"> 游戏
                                </label>
                                <label class="checkbox-inline">
                                    <input type="checkbox" th:checked="${stu.stu_interest!=null&&stu.stu_interest.contains('做饭')}" name="stu_interest" id="stu_interest5" value="做饭"> 做饭
                                </label>
                                <!-- <input type="checkbox" id="checkboxs" name="like" value="电影"/>电影
                                <input type="checkbox" id="checkboxs" name="like" value="篮球"/>篮球
                                <input type="checkbox" id="checkboxs" name="like" value="看书"/>看书
                                <input type="checkbox" id="checkboxs" name="like" value="游戏"/>游戏
                                <input type="checkbox" id="checkboxs" name="like" value="做饭"/>做饭 -->
                            </div>
                        </div>



                        <div class="form-group">
                            <label for="stu_education" class="col-sm-2 control-label">学历</label>
                            <div class="col-sm-10">
                                <select class="form-control" id="stu_education" name="stu_education" style="width: 100px;">
                                    <option value="大专" th:field="${stu.stu_education}">大专</option>
                                    <option value="本科" th:field="${stu.stu_education}">本科</option>
                                    <option value="硕士" th:field="${stu.stu_education}">硕士</option>
                                    <option value="博士" th:field="${stu.stu_education}">博士</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="tel" class="col-sm-2 control-label">电话</label>
                            <div class="col-sm-10">
                                <input type="number" th:value="${stu.stu_phone}" class="form-control" placeholder="电话" id="tel" name="stu_phone"/>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="email" class="col-sm-2 control-label">Email</label>
                            <div class="col-sm-10">
                                <input type="email" th:value="${stu.stu_email}" class="form-control" placeholder="Email" id="email" name="stu_email"/>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="addr" class="col-sm-2 control-label">家庭住址</label>
                            <div class="col-sm-10">
                                <input type="text" th:value="${stu.stu_address}" class="form-control" placeholder="家庭住址" id="addr" name="stu_address"/>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="color" class="col-sm-2 control-label">幸运色</label>
                            <div class="col-sm-10">
                                <input type="color" th:value="${stu.my_color}" class="form-control" id="color" name="my_color"/>
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="lucky_number" class="col-sm-2 control-label">幸运数字</label>
                            <div class="col-sm-10">
                                <input type="text" th:value="${stu.lucky_number}" class="form-control" placeholder="幸运数字" id="lucky_number" name="lucky_number"/>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">自我介绍</label>
                            <div class="col-sm-10">
                                <textarea style="width: 1000px;height: 600px;" th:text="${stu.re_mark}" name="re_mark" class="form-control" rows="3"></textarea>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-info">修改学生</button>
                            </div>
                        </div>
                    </form>
                    <div id="info"></div>
                </div>
                <div class="col-md-6">
                    <img src="/photo/timg.jpg" alt="Responsive image" class="img-rounded" width="80%" height="auto">
                    <div class="form-group">
                        <label for="exampleInputFile">选择图片 </label>
                        <input type="file" class="form-control" id="exampleInputFile">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>